package com.jy.adscm.hcPlan.mapper.mysql;

import com.jy.adscm.hcPlan.bean.Hc_plan_supplier;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 供应商配置表 Mapper 接口
 * </p>
 *
 * @author yyy
 * @since 2018-09-11
 */
public interface Hc_plan_supplierMapper extends BaseMapper<Hc_plan_supplier> {

    @Select("SELECT HPS.* FROM hc_plan_supplier HPS " +
            "LEFT JOIN hc_plan_supplier_materiel HPSM " +
            "ON HPS.ID = HPSM.supplier_id " +
            "WHERE HPSM.materiel_id = #{materiel_id}")
    public List<Hc_plan_supplier> getSuplierByMaterielId(@Param("materiel_id") int materiel_id);

}
